#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#define N 20

int main(void)
{
    int arr[N];
    srand(time(NULL));

    printf("正序数组为：\n");
    for (int i = 0; i < N; i++){
        arr[i] = rand() % 1000;
        printf("%d ", arr[i]);
    }

    /* 倒序输出打印 */
    printf("\n倒序数组为：\n");
    for (int i = N - 1; i >= 0; i--)
        printf("%d ", arr[i]);

    printf("\n");
    return 0;
}
